/**
 * @function :
 * @version : v1.0
 * @author : JeffOsmond
 * @createTime : 2018/8/1 10:29
 */
package com.atwork.service.impl;

import com.atwork.dao.SysUserDao;
import com.atwork.model.normal.SysUser;
import com.atwork.service.SysUserService;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service(value = "sysUserService")
public class SysUserServiceImpl implements SysUserService {

    @Autowired
    private SysUserDao sysUserDao;

    /**
     * 获取全部User
     * @return
     */
    @Override
    public List<SysUser> getAllUser(int pageNum,int pageSize){
        PageHelper.startPage(pageNum,pageSize);
        return sysUserDao.getAllUser();
    }

    @Override
    public SysUser getUserByLoginName(String loginName) {
        return sysUserDao.getUserByLoginName(loginName);
    }
}
